package com.nameless.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 *
 * </p>
 *
 * @author chh
 * @since 2023-02-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_car")
@ApiModel(value = "Car对象", description = "")
public class Car implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("carName")
    private String carName;

    @ApiModelProperty(value = "类型")
    private Integer type;

    @ApiModelProperty(value = "座位")
    private Integer seat;

    private Integer brandId;

    private Integer configId;

    @ApiModelProperty(value = "简介")
    private String intro;

    @ApiModelProperty(value = "车辆识别码")
    private String vin;

    private Double buyPrice;

    @ApiModelProperty(value = "门店编号")
    private Integer shopId;

    @ApiModelProperty(value = "车辆状态(可租1，维修中2，租出3，删除4)")
    private Integer state;

    @ApiModelProperty(value = "价钱")
    private Double price;

    @ApiModelProperty(value = "头像")
    private String headPic;

    //关联表
    @TableField(exist = false)
    private CarType carType;

    @TableField(exist = false)
    private CarTypeConfigDetails carTypeConfigDetails;

    @TableField(exist = false)
    private Shop shop;

    @TableField(exist = false)
    private Brand brand;

    @TableField(exist = false)
    private String typeName;

    @TableField(exist = false)
    private String brandName;

    @ApiModelProperty(value = "优惠类型")
    @TableField(exist = false)
    private Integer cType;

    @ApiModelProperty(value = "满减金额")
    @TableField(exist = false)
    private BigDecimal cDenominations;

    @ApiModelProperty(value = "折扣数")
    @TableField(exist = false)
    private BigDecimal cDiscount;

    @ApiModelProperty(value = "普通优惠钱数")
    @TableField(exist = false)
    private BigDecimal value;
}
